import axios from "@/utils/http"
export enum Api {
    ConversationList = "/v1/api/Conversation/List",
    ConversationGroupList = "/v1/api/ConversationGroup/List",
    modelList = "/v1/api/models/List",
    chatStream = "/v1/api/chat/stream",
     chatTitle = "/v1/api/chat/chatTitle",
     
     ConversationGroupUpdate = "/v1/api/ConversationGroup/Update"
}
export const getConversationList = <T>(parmas: any) => {
    return axios.get<T>(Api.ConversationList, parmas) as Promise<T>
}

export const ConversationGroupList = <T>(parmas?: any) => {
    return axios.get<T>(Api.ConversationGroupList, parmas) as Promise<T>
}

export const modelList = <T>(parmas?: any) => {
    return axios.get<T>(Api.modelList, parmas) as Promise<T>
}

export const getChatTitle = <T>(parmas:{content:string}) => {
    return axios.post<T>(Api.chatTitle, parmas) as Promise<T>
}

export const ConversationGroupUpdate = <T>(parmas:{id:number,title:string}) => {
    return axios.post<T>(Api.ConversationGroupUpdate, parmas) as Promise<T>
}
